package com.bootx.entity;

import jakarta.persistence.*;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

/**
 * @author black
 */
@Entity
public class WriteToolTask extends BaseEntity<Long> {

    @NotEmpty
    @Column(length = 100,nullable = false,updatable = false,unique = true)
    private String sn;

    @NotNull
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false,updatable = false)
    private WriteTool writeTool;

    private String content;

    /**
     * 0: 未开始
     * 1： 进行中
     * 2：已结束
     * -1：已过期
     */
    private Integer status;

    @Column(columnDefinition = "longtext")
    private String result;

    private Boolean isShow;

    /**
     * 0: 字符串
     * 1：json
     */
    private Integer userInputType;

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public WriteTool getWriteTool() {
        return writeTool;
    }

    public void setWriteTool(WriteTool writeTool) {
        this.writeTool = writeTool;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Boolean getIsShow() {
        return isShow;
    }

    public void setIsShow(Boolean show) {
        isShow = show;
    }

    public Integer getUserInputType() {
        return userInputType;
    }

    public void setUserInputType(Integer userInputType) {
        this.userInputType = userInputType;
    }
}
